class RefreshToken {
  late String accessToken;
  late String refreshToken;
  late String tokenType;
  late int expiresIn;
  late int refreshExpiresIn;
  late String scope;

  RefreshToken.fromJson(Map<String, dynamic> json) {
    var data = json['data'];
    accessToken = data['access_token'] ?? '';
    refreshToken = data['refresh_token'] ?? '';
    tokenType = data['token_type'] ?? '';
    expiresIn = data['expires_in'] ?? 0;
    refreshExpiresIn = data['refresh_expires_in'] ?? 0;
    scope = data['scope'] ?? '';
  }
}

class RefreshAccessToken {
  late int code;
  late RefreshToken data;
  late String message;

  RefreshAccessToken.fromJson(Map<String, dynamic> json) {
    code = json['code'] ?? 0;
    data = RefreshToken.fromJson(json['data'] ?? {});
    message = json['message'] ?? '';
  }
}
